package routers

import (
	"github.com/astaxie/beego"
	"goweb/controllers"
)

func init() {
	beego.Router("/", &controllers.HomeController{}, "get:Getmain")
	beego.Router("/index", &controllers.HomeController{}, "get:Index")
	beego.Router("/area", &controllers.HomeController{}, "get:Area")
	beego.Router("/area/add", &controllers.HomeController{}, "get:Add")
	beego.Router("/area/addSubmit", &controllers.HomeController{}, "post:Addsubmit")
	beego.Router("/api/v1.0/area", &controllers.AreaController{}, "get:GetArea")
	beego.Router("/login", &controllers.RegisterController{}, "get:Login;post:Checklogin")
	beego.Router("/api/v1.0/register", &controllers.RegisterController{}, "post:Register")
	beego.Router("/api/v1.0/session", &controllers.GetSessionController{}, "get:ISession;delete:DSession")
	beego.Router("/api/v1.0/login", &controllers.GetSessionController{}, "post:Login")
	beego.Router("/api/v1.0/upload", &controllers.UploadController{}, "post:UploadFile;get:DownLoadFile")
}
